Skip to content

[release/11.0] [ci-fix] Mark Apple test runner LibraryImports safe (refs #134061) - #134326

Open
github-actions[bot] wants to merge 1 commit into
release/11.0from
backport/pr-134134-to-release/11.0
Open

github-actions[bot] wants to merge 1 commit into
release/11.0from
backport/pr-134134-to-release/11.0

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Backport of #134134 to release/11.0

11.0 version of a fix for #134061

/cc @vitek-karas @github-actions[bot]

Customer Impact

  • Customer reported
  • Found internally

This is a test-only change to adapt tests to the new unsafe/safe rules enabled on the repo.

Regression

  • Yes
  • No

#134061

Testing

This is a build break in extra-platforms, so rerunning extra platforms in CI to validate the fix.

Risk

Low - test-only fix.

IMPORTANT: If this backport is for a servicing release, please verify that:

  • For .NET 8 and .NET 9: The PR target branch is release/X.0-staging, not release/X.0.
  • For .NET 10+: The PR target branch is release/X.0 (no -staging suffix).

Package authoring no longer needed in .NET 9

IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older versions.

…134134)

Fixes the Apple NativeAOT test-runner build under the updated
memory-safety rules by marking the two `LibraryImport` declarations
`safe`.

The native entry points synchronously copy the marshalled UTF-8 input
into `NSString` and do not retain, mutate, or perform pointer operations
on the caller's buffer. Marking the declarations `unsafe` removed
`SYSLIB1064` but introduced `CS9362` at all four ordinary call sites.

Validated with the exact iOS-simulator reproducer and the targeted
repository build using `Features=updated-memory-safety-rules`; both
completed with zero warnings and zero errors. A full local Apple
NativeAOT build is not available because the installed Xcode rejects the
repository's iOS 13 deployment target before managed compilation.

Refs #134061

> [!NOTE]
> This pull request description was updated with GitHub Copilot.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Vitek Karas <10670590+vitek-karas@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

@vitek-karas

Copy link
Copy Markdown
Member

/azp run runtime-extra-platforms

@vitek-karas vitek-karas self-assigned this Sep 21, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@davidnguyen-tech

Copy link
Copy Markdown
Member

Thanks for backporting :)

@akoeplinger

Copy link
Copy Markdown
Member

there are still a few "unsafe" errors in the nativeaot build

@matouskozak

Copy link
Copy Markdown
Member

there are still a few "unsafe" errors in the nativeaot build

There is another parallel PR to this which will need to be backported #134212

@vitek-karas vitek-karas added the Servicing-consider Issue for next servicing release review label Sep 21, 2026
@steveisok steveisok added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 21, 2026
@steveisok

Copy link
Copy Markdown
Member

there are still a few "unsafe" errors in the nativeaot build

There is another parallel PR to this which will need to be backported #134212

I created #134365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants